package com.javandad.app.client.cells;

import com.google.gwt.cell.client.AbstractCell;
import com.google.gwt.cell.client.Cell;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
import com.javandad.app.shared.entity.User;

public class UserCell extends AbstractCell<User> {

	@Override
	public void render(Cell.Context context, User value, SafeHtmlBuilder sb) {
		User u = value;
		sb.appendHtmlConstant("<table align='left'  bgcolor='white' width='100%'><tr height='48' aligh='left'><td width='48'><img width='48' height='48' src='" + u.getProfileFodoURL()
				+ "'></img></td>");
		sb.appendHtmlConstant("<td width='100%' align='left'><table width='100%' ><tr><td><h3>");
		sb.appendEscaped(value.toString());

		sb.appendHtmlConstant("</h3></td></tr></table></td></tr></table>");
	}

}
